/*
 * test_encode.cpp
 *
 *  Created on: Sep 6, 2014
 *      Author: killerg
 */

#include "../share/util.h"
#include "../share/http_s.h"
#include <string>
using namespace std;

bool
test_encode() {
	string a = "MyxBMDAwMDA0OUFBNkJCQiwxNzMzMjgyOQ%3D%3D";
	string b = "MyxBMDAwMDA0OUFBNkJCQiwxNzMzMjgyOQ==";

    string decoded = decode(a.c_str());
    string decodedcallbackInfo = base64_decode(decoded.c_str(), decoded.length());

	printf("%s\n", decodedcallbackInfo.c_str());

//	int bytelen = 64;
//	int testnum = 10000;
//
//	for (int i=0; i<testnum; ++i) {
//		uint8_t hex[bytelen];
//		for (int j=0; j<bytelen; ++j) {
//			hex[j] = rand()%256;
//		}
//		string decoded = hex_to_cstr(hex, bytelen);
//
//
//	}

	return true;
}
